package com.panfeng.xcloud.component.sms.utils;


public class HttpSenderTest {

	public static void main(String[] args) {
		String url = "http://zapi.253.com/msg/";// 应用地址
		String account = "V7061630";// 账号
		String pswd = "ml2scZS4RA7763";// 密码
		String mobile = "18679107639";// 手机号码，多个号码使用","分割
		String msg = "您好，您的验证码是123456";// 短信内容
		boolean needstatus = true;// 是否需要状态报告，需要true，不需要false
		String extno = null;// 扩展码

		try {
			String returnString = HttpVoiceVerCodeSender.batchSend(url, account, pswd, mobile, msg, needstatus, extno);
			System.out.println(returnString);
			//20191118181211,0\n1001118181211704700\n
			String t = "20191118182257,0\n" +
					"1001118182257902200";
			if(t.indexOf("\n") != -1){
				System.out.println(t.split(",")[1].split("\n|\r")[0]);
			}

			//System.out.println(t);
			// TODO 处理返回值,参见HTTP协议文档
		} catch (Exception e) {
			// TODO 处理异常
			e.printStackTrace();
		}
	}
}
